package com.example.onlinemarket.bean;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Arrays;

public class Good implements Serializable {
    private Integer goodId;//鲜花ID
    private String goodName;//鲜花名
    private Integer quantity;//鲜花库存
    private Integer sellNum;//鲜花销量
    private Double sellPrice;//鲜花售价
    private Double purchasePrice;//鲜花进价
    private Integer userId;//商家ID
    private String description;//鲜花描述
    private String species;//鲜花种类
    private boolean status;//鲜花状态(上架/下架)
    private byte[] photo;//鲜花图片



    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Good{" +
                "goodId=" + goodId +
                ", goodName='" + goodName + '\'' +
                ", quantity=" + quantity +
                ", sellNum=" + sellNum +
                ", sellPrice=" + sellPrice +
                ", purchasePrice=" + purchasePrice +
                ", userId=" + userId +
                ", description='" + description + '\'' +
                ", species='" + species + '\'' +
                ", status=" + status +
//                ", photo=" + Arrays.toString(photo) +
                '}';
    }

    public Integer getGoodId() {
        return goodId;
    }

    public void setGoodId(Integer goodId) {
        this.goodId = goodId;
    }

    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getSellNum() {
        return sellNum;
    }

    public void setSellNum(Integer sellNum) {
        this.sellNum = sellNum;
    }

    public Double getSellPrice() {
        return sellPrice;
    }

    public void setSellPrice(Double sellPrice) {
        this.sellPrice = sellPrice;
    }

    public Double getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(Double purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getSpecies() {
        return species;
    }

    public void setSpecies(String species) {
        this.species = species;
    }

    public byte[] getPhoto() {
        return photo;
    }

    public void setPhoto(byte[] photo) {
        this.photo = photo;
    }
}
